package com.crowdfunding.service;

import com.crowdfunding.entity.CrowdFunding;
import com.baomidou.mybatisplus.extension.service.IService;
import com.crowdfunding.exception.ImageUploadException;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaoyu
 * @since 2021-07-09
 */
public interface ICrowdFundingService extends IService<CrowdFunding> {

    abstract List<CrowdFunding> getCrowdFundingList();

     void add(CrowdFunding crowdFunding);

    void insertCrowdFunding(CrowdFunding crowdFunding);

    CrowdFunding selectById(String cfId);

    void deleteCrowFunding(String cfId);

    void updateCrowdFunding(CrowdFunding cF);

    int addAmount(double cfrAmount,String cfId,String username);

    CrowdFunding getOneCrowFunding(String cfId);

    void changeCrowdFundingStatus(String cfId, int status);

    List<CrowdFunding> getCrowdFundingListByuserName(String username);

    List<CrowdFunding> getparticipateList(String username);


    void addCrowdFunding(CrowdFunding crowdFunding, MultipartFile[] files) throws ImageUploadException, Exception;
}
